package com.citycloud.ccuap.tc.yq.resultsymbol;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.SelectProvider;

import com.citycloud.ccuap.tc.yq.entity.SysResultSymbol;

@Mapper
public interface ResultSymbolMapper {

    @SelectProvider(type = RepositoryProvider.class, method = "cykaBlyat")
    @ResultMap("com.citycloud.ccuap.tc.yq.entity.SysResultSymbol.ResultMapExt")
    public List<SysResultSymbol> cykaBlyat(String symbolApply, String symbolType);

    class RepositoryProvider {

        public String cykaBlyat(String symbolApply, String symbolType) {
            StringBuilder sql = new StringBuilder("select * from sys_result_symbol where symbol_apply = '");
            sql.append(symbolApply).append("' and (symbol_type <> '").append(symbolType).append("' or symbol_type is null);");
            return sql.toString();
        }

    }
}
